package com.example.d01线程的实现.testRunnable;


//创建线程方法2：实现runnable接口，重写run方法,将执行的线程放入runnable接口的实现类（Thread）,调用start方法
public class test1 implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println("Runnable");
        }
    }


    public static void main(String[] args) {
        test1 test=new test1();
        Thread tes = new Thread(test);

        tes.start();

        for (int i = 0; i < 200; i++) {
            System.out.println("主线程");
        }
    }
}
